var combogridTarget;
$(function(){
	$.extend($.fn.datagrid.defaults.editors, {
		   combogrid: {
			    init: function(container, options){
				    var input = $('<input  type="text" class="datagrid-editable-input">').appendTo(container);
				   	input.combogrid(options);
				    return input;
		    	},
		    	distroy:function(target){
		    		$(target).combogrid('distroy');
		    	},
			    getValue: function(target){
			    	return $(target).combogrid('getValue');
			    },
			    setValue: function(target, value){
			   	 	$(target).combogrid('setValue',value);
			    },
			    resize: function(target, width){
			    	combogridTarget = target;
				    $(target).combogrid('resize',width);
			    }
		    }
		 });
	
	$.extend($.fn.datagrid.defaults.editors, {  
	    numberbox: {  
	        init: function(container, options){  
				if(options!=undefined){
					if(options.myFlag == '1'){
	           	 		var input = $('<input type="text" class="datagrid-editable-input" onClick="selectText(this)">');
	           	 		myFunction(input,options.backFunction);
	           	 		input.appendTo(container);  
	            		return input;  
					}
				}
	            var input = $('<input type="text" class="datagrid-editable-input" onClick="selectText(this)">').appendTo(container);  
	            return input;  
	        },  
	        getValue: function(target){  
	            return $(target).val();  
	        },  
	        setValue: function(target, value){  
	            $(target).val(value);  
	        },  
	        resize: function(target, width){  
	            var input = $(target);  
	            if ($.boxModel == true){  
	                input.width(width - (input.outerWidth() - input.width()));  
	            } else {  
	                input.width(width);  
	            }  
	        }  
	    }  
	}); 
});